package com.xhsj.user.hr.system.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xhsj.user.hr.system.entity.TbHrApprovalDimissionApply;
import com.xhsj.user.hr.system.vo.DimissionApplyAuditTaskVo;
import com.xhsj.user.hr.system.vo.GetHandOverDataInfoByIdVo;
import org.apache.ibatis.annotations.Mapper;
import com.xhsj.user.hr.system.entity.TbHrApprovalDimissionHandoverApply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 * <p>
 * hr流程-离职交接申请表 Mapper 接口
 * </p>
 *
 * @author suxiaolin
 * @since 2020-09-09
 */
@Mapper
public interface TbHrApprovalDimissionHandoverApplyMapper extends BaseMapper<TbHrApprovalDimissionHandoverApply> {

    /**
     * 查询待审核任务
     * @author 苏小林
     * @date 2020/9/9 18:34
     * @param: page
     * @param: userId
     * @param: roleIds
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<com.xhsj.user.hr.system.vo.DimissionApplyAuditTaskVo>
     */
    IPage<DimissionApplyAuditTaskVo> findDimissionHandoverApplyRunTask(Page<TbHrApprovalDimissionApply> page, @Param("userId") Long userId, @Param("roleIds") List<Long> roleIds);

    /**
     * 查询历史任务
     * @author 苏小林
     * @date 2020/9/9 18:34
     * @param: page
     * @param: userId
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<com.xhsj.user.hr.system.vo.DimissionApplyAuditTaskVo>
     */
    IPage<DimissionApplyAuditTaskVo> findDimissionHandoverApplyHiTask(Page<TbHrApprovalDimissionApply> page, @Param("userId") Long userId);

    /**
     * 通过id查询数据
     * @author 苏小林
     * @date 2020/9/10 9:59
     * @param: id
     * @return: com.xhsj.user.hr.system.vo.GetHandOverDataInfoByIdVo
     */
    GetHandOverDataInfoByIdVo getDataInfoById(@Param("id") Long id);

    /**
     * 修改申请人确认状态 以及确认意见
     * @author 苏小林
     * @date 2020/9/11 13:37
     * @param: id
     * @param: applyConfirmOpinion
     */
    void updateApplyConfirm(@Param("id") Long id, @Param("opinion") String opinion);
}
